DictionaryWrite Node
The DictionaryWrite Node
gets a key-value pair to the Input Port
, searches for the key in the Dictionary Collection
, writes key-value pair to the Dictionary Collection
, returns a status of writing.
The example above demonstrates the DictionaryWrite Node
having the following Input Ports
:
key
Input Port
(named by default) gets the name of the key, ex."key" = "ID1"
;object
Input Port
(unnamed by default) gets the value of the key as an object, ex.{"ts": 1000000000, "key": "A", "value": 1}
.
The DictionaryWrite Node
has an optional boolean Output Port
(switched off by default):
bool
Output Port
namedis_written
sendsTrue
value to the output if thekey
:value
pair is successfully written to theCollection
namedABCD
.
The DictionaryWrite Node
has the following Configuration Parameters
:
Expiration Time
in the range from0
to172800 seconds
to limit the lifetime of the Dictionary.Collection Name
to address the Dictionary.
The DictionaryWrite Node
allows to add Input Ports
of any types of data.
In the example above the Constant Node
writes to the DictionaryWrite Node
to the ABCD
Collection for the "key" : "ID1"
the following “key” : “value”
pairs:
- for
“key” : “A”
(object data type) writes the value{"ts": 1000000000, "key": "A", "value": 1}
; - for
“key” : “B”
(number data type) writes the value3.14
; - for
“key” : “C”
(integer data type) writes the value42
; - for
“key” : “D”
(boolean data type) writes the valueTrue
; - for
“key” : “E”
(string data type) writes the value"Hello, World!"
; - for
“key” : “F”
(array data type) writes the value[1, 2, 3, 4, 5]
.
If the writing performed successfully, the bool
value True
is sent to the output is_written
Port
.